﻿using Simple.Admin.System.Enums;
using System;
using System.Collections.Generic;
using Volo.Abp.Application.Dtos;

namespace Simple.Admin.System.Dtos;

public class MenuTreeDto : EntityDto<Guid>
{
    /// <summary>
    /// 菜单名字
    /// </summary>
    public string Name { get; set; } = string.Empty;

    /// <summary>
    /// 菜单类型
    /// </summary>
    public MenuTypeEnum Type { get; set; } = MenuTypeEnum.Menu;

    /// <summary>
    /// 父级Id（顶级菜单为 null）
    /// </summary>
    public Guid? ParentId { get; set; }

    /// <summary>
    /// 菜单路径
    /// </summary>
    public string Path { get; set; } = string.Empty;

    /// <summary>
    /// 菜单组件路径
    /// </summary>
    public string? Component { get; set; }

    /// <summary>
    /// 重定向地址（如：/redirect）
    /// </summary>
    public string Redirect { get; set; } = string.Empty;

    /// <summary>
    /// meta
    /// </summary>
    public RouteMeta Meta { get; set; } = new();

    public List<MenuTreeDto> Children { get; set; } = [];
}
